﻿using NUnit.Framework;

namespace PhotoFramePublishingPlugin.Tests
{
    [TestFixture]
    public class ShortenFileNameTests
    {
        [Test]
        public void GetDestinationPath_WithShortenFalse_ReturnsFullPath()
        {
            const string destinationRoot = @"D:\Temp";
            const string originalFileName = "ThisIsALongFileName.jpg";
            string actual = PublishPlugin.GetDestinationPath(destinationRoot, originalFileName, false);

            const string expected = @"D:\Temp\ThisIsALongFileName.jpg";
            Assert.AreEqual(expected, actual);
        }

        [Test]
        public void GetDestinationPath_WithShortenTrue_ReturnsShortPath()
        {
            const string destinationRoot = @"D:\Temp";
            const string originalFileName = "ThisIsALongFileName.jpg";
            string actual = PublishPlugin.GetDestinationPath(destinationRoot, originalFileName, true);

            const string expected = @"D:\Temp\ThisIsAL.jpg";
            Assert.AreEqual(expected, actual);
        }
    }
}
